<script>
	export default {
		onLaunch: function() {
			// console.log('App Launch')
			const updateManager = wx.getUpdateManager()

			updateManager.onCheckForUpdate(function(res) {
				// 请求完新版本信息的回调
				console.log(res.hasUpdate)
			})

			updateManager.onUpdateReady(function() {
				wx.showModal({
					title: '更新提示',
					content: '新版本已经准备好，确定重启应用？',
					showCancel: false,
					success: function(res) {
						// 新的版本已经下载好，调用 applyUpdate 应用新版本并重启
						updateManager.applyUpdate()
					}
				})
			})

			updateManager.onUpdateFailed(function() {
				// 新版本下载失败
			})
		},
		onShow: function(options) {
			console.log('App Show', options)
		},
		onHide: function() {
			// console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import "/static/iconfont/font.scss";

	.uni-data-checklist .checklist-group .checklist-box {
		width: 33%;
	}

	/*每个页面公共css */
	view {
		font-size: 14px;
	}

	.uni-data-checklist .checklist-group .checklist-box {
		margin-right: 0 !important;
	}

	[alt] {
		text-indent: 0;
		width: 100%;
		height: auto;
		border-radius: 5px;
		margin-top: 10px;
	}

	// .uni-select {
	// 	border: 1px solid #c182ba !important;
	// 	height: 40px !important;
	// 	border-bottom: unset;
	// }

	.no-list {
		text-align: center;
		padding-top: 10vh;
		color: #999;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;

		&.ft {
			padding-bottom: 10vh;
		}

		image {
			width: 50%;
		}
	}

	image {
		width: 0;
		height: 0;
	}

	/* 解决H5 的问题 */
	/* #ifdef H5 */
	uni-scroll-view .uni-scroll-view::-webkit-scrollbar {
		/* 隐藏滚动条，但依旧具备可以滚动的功能 */
		display: none;
		width: 0 !important;
		height: 0 !important;
		-webkit-appearance: none;
		background: transparent;
		color: transparent;
	}

	/* #endif */

	uni-page-wrapper {
		background: #f7f7f7;
	}

	/* 多选 */
	uni-checkbox-group {
		width: 100% !important;
		border-radius: 50%;
	}

	uni-checkbox-group uni-label {
		width: 33% !important;
		display: inline-flex;
		margin-bottom: 20rpx;

		border-radius: 50%;

	}

	/*checkbox 选项框大小  */
	uni-checkbox .uni-checkbox-input {
		width: 35rpx !important;
		height: 35rpx !important;
		border-color: #E6E6E6;
		border-radius: 4px;
		background-color: #E6E6E6;
		border: 0;
	}

	/*checkbox选中后样式  */
	uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
		background: #c182ba;
		border-radius: 4px;
		border: 0;
	}

	/*checkbox选中后图标样式  */
	uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked::before {
		width: 35rpx;
		height: 35rpx;
		line-height: 35rpx;
		text-align: center;
		font-size: 22rpx;
		color: #fff;
		background: transparent;
		border: 0;
	}

	uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
		border-color: #eee;
		border: 0;
	}

	/* 单选 */
	uni-radio-group {
		width: 100% !important;
		border-radius: 50%;
	}

	uni-radio-group uni-label {
		width: 33% !important;
		display: inline-flex;
		margin-bottom: 20rpx;

		border-radius: 50%;

	}

	/*radio 选项框大小  */
	.uni-radio-input {
		width: 35rpx !important;
		height: 35rpx !important;
		border-color: #E6E6E6;
		border-radius: 50%;
		background-color: #E6E6E6;
	}

	/*radio选中后样式  */
	uni-radio .uni-radio-input.uni-radio-input-checked {
		background: #DBB584 !important;
		border-color: #DBB584 !important;
		border-radius: 50%;

	}

	/*radio选中后图标样式  */
	uni-radio .uni-radio-input.uni-radio-input-checked::before {
		width: 35rpx;
		height: 35rpx;
		line-height: 35rpx;
		text-align: center;
		font-size: 22rpx;
		color: #fff;
		background: transparent;

	}

	uni-radio:not([disabled]) .uni-radio-input:hover {
		border-color: #E6E6E6;
	}

	.btn {
		width: 70%;
		height: 40px;
		line-height: 40px;
		text-align: center;
		margin: 15px auto;
		color: #fff;
		background: #c182ba;
		border-radius: 5px;
		margin-top: 30px;
		font-size: 15px;

		&.primary {
			background: #fff;
			color: #c182ba;
		}
	}
</style>